# Maintainer: Maxime Gauduin <alucryd@archlinux.org>
# Contributor: PelPix <kylebloss@pelpix.info>

pkgname=fdkaac
pkgver=1.0.5
pkgrel=1
pkgdesc='Command line encoder frontend for libfdk-aac'
arch=(loong64 x86_64)
url=https://github.com/nu774/fdkaac
license=(custom)
depends=(
  glibc
  libfdk-aac.so
)
makedepends=(git)
_tag=3bf454a5a3dada143fa2d389c0b1dccc87051303
source=(git+https://github.com/nu774/fdkaac.git#tag=${_tag})
sha256sums=(SKIP)

prepare() {
  cd fdkaac

  autoreconf -fiv
}

pkgver() {
  cd fdkaac

  git describe --tags | sed 's/^v//'
}

build() {
  cd fdkaac

  ./configure \
    --prefix=/usr \
    --disable-rpath
  make
}

package() {
  make DESTDIR="${pkgdir}" -C fdkaac install
  install -Dm 644 fdkaac/COPYING -t "${pkgdir}"/usr/share/licenses/fdkaac/
}

# vim: ts=2 sw=2 et:
